<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <title>文件上传下载</title>
</head>
<body>
<center>
<form th:action="@{/file/upload}" method="post" enctype="multipart/form-data">
    <table>
        <tr>
            <td><input type="file" name="file" /></td>
        </tr>
        <tr>
            <td><input type="submit" value="提交"/></td>
        </tr>
        <hr>

    </table>
</form>
<table>
    <tr th:each="file : ${file}">
        <td> <a th:href="@{/file/show}" th:text="${file.filename}"></a></td>
        <td><a th:href="@{'/file/get?id='+${file.id}}"><button>下载</button></a></td>
    </tr>
</table>
    <table>
        <tr th:each="file : ${file}">
            <td> <img style="width: 50%" th:src="@{${file.picAddress}}" alt="没有图片"/></td>
            <td th:text="${file.picAddress}"></td>
        </tr>
    </table>

</center>
</body>
</html>